<?php
	$form = $_POST;
	$invoice = new Invoice();
	$invoice->select($invoice_id);
	$invoice->settype($form['invoice_type']);
	if ($form['invoice_type'] == 'COMPANY') {
		$invoice->setcompany_name($form['company_name']);
		$invoice->settax_code($form['company_tax_code']);
	}
	$invoice->setpayment_method($form['payment_method']);
	$invoice->setstatus($form['status']);
	$invoice->update();
	admin_load('Hoá Đơn Đã Được Cập Nhật Thành Công', '?act=invoices_manager');
?>